Skip to content

feat: support OpenAI, Google, xAI Image Edits protocol#28

Merged
chenyme merged 4 commits into
devfrom
image_edit
May 23, 2026
Merged

feat: support OpenAI, Google, xAI Image Edits protocol#28
chenyme merged 4 commits into
devfrom
image_edit

Conversation

@chenyme

@chenyme chenyme commented May 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Add image generation and image editing protocol support across the three provider commits:

  • Add OpenAI Images Edits support, including image edit inputs, mask support, streaming handling, usage parsing, and admin route binding updates.
  • Add Google Gemini image generation/editing support through the Google Image Generation protocol, including Nano Banana model inference and image edit input handling.
  • Add xAI Images Generations and Images Edits support, including separate route protocols, request/response parsing, model inference, and admin UI protocol selection.

The admin console now supports provider image generation/editing protocol binding where applicable, including same-provider dual protocol bindings for image models.

Change type

  • Bug fix
  • Feature
  • Documentation
  • Refactor
  • Configuration / deployment
  • Security hardening
  • Other

Affected areas

  • Frontend / UI
  • Backend / API
  • Authentication / authorization
  • Conversations / streaming
  • Files / RAG / extraction
  • Model routing / providers
  • MCP / tools
  • Billing / payments
  • Admin console
  • Deployment / Docker / configuration
  • Documentation

Verification

  • cd backend && go test ./...
  • cd frontend && pnpm lint
  • cd frontend && pnpm build

Screenshots, API examples, or logs

No screenshots included. Provider debug snapshots were reviewed to avoid exposing API keys, upstream base URLs, or source image bytes.

Configuration, migration, and compatibility notes

No new environment variables are required.

Database baseline migration updates include route uniqueness by platform_model_id + upstream_model_id + protocol, allowing separate image generation and image editing bindings for the same upstream model. Existing single-protocol route payloads remain supported; new multi-protocol import fields are additive.

API additions include image edit mask input, suggested protocol lists, import result protocol details, and image edit routing behavior.

Documentation

  • Documentation is not needed for this change.
  • Documentation was updated.
  • Documentation still needs to be updated.

Security and privacy

  • No secrets, tokens, credentials, local config, or personal data are included.
  • User data access remains scoped by authenticated user context unless an admin-only path explicitly requires broader access.
  • Security-sensitive behavior was reviewed, including authentication, authorization, provider routing, file processing, billing, and admin APIs where relevant.

Checklist

  • I searched existing issues and pull requests.
  • Changes are focused and do not include unrelated refactors.
  • Tests or static verification were run where practical.
  • User-facing behavior, deployment steps, API contracts, or configuration changes are documented.
  • Generated artifacts are included only when this project explicitly requires them.
  • Caches, build output, .pyc files, .env files, and local storage data are not committed.

@chenyme chenyme linked an issue May 23, 2026 that may be closed by this pull request
3 tasks
@chenyme
chenyme merged commit 9cdfe93 into dev May 23, 2026
2 checks passed
@chenyme
chenyme deleted the image_edit branch May 23, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: gpt-image-2 无法编辑图片

1 participant